package com.huidu.bitrade.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.huidu.bitrade.config.CustomerBigDecimalSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("activity_hdz_order")
@ApiModel("hdz质押记录")
public class ActivityHdzOrder {
    @ApiModelProperty("id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("活动id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long activityId;

    @ApiModelProperty("用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long memberId;

    @ApiModelProperty("参与数量")
    private BigDecimal number;

    @ApiModelProperty("当前数量（含带利息）")
    private BigDecimal currentNumber;

    @ApiModelProperty("总利息")
    @JsonSerialize(using = CustomerBigDecimalSerialize.class)
    private BigDecimal interest;

    @ApiModelProperty("前一天利息")
    @JsonSerialize(using = CustomerBigDecimalSerialize.class)
    private BigDecimal lastInterest;

    @ApiModelProperty("0.已参与1.挖矿中2.已结束")
    private Integer status;

    @ApiModelProperty("币种")
    private String symbol;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private Long createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("修改时间")
    private Long updateTime;

    @ApiModelProperty("赎回时间")
    private Long redeemTime;
}
